package com.songlanyun.modules.account.model.dto;

import java.io.Serializable;

import com.songlanyun.common.validator.group.AppGroup;
import com.songlanyun.common.validator.group.UpdateGroup;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

/**
 * 设置支付密码
 *
 * @author lijiahe 2022-09-22
 */
@Data
public class SetUpPaymentPasswordDTO implements Serializable {

    /**
     * 用户id
     */
    private Long userId;

    /**
     * 支付密码
     */
    @Pattern(regexp = "^\\d{6}$", message = "支付密码格式有误", groups = AppGroup.class)
    @NotEmpty(message = "支付密码不能为空", groups = UpdateGroup.class)
    private String payPass;

    /**
     * 验证码
     */
    @NotEmpty(message = "验证码不能为空", groups = AppGroup.class)
    private String captcha;

}
